<!DOCTYPE html>
<html>

<head>
    <style>

    </style>
    <script>
        function js_function(id) {
            //statement;
            id.innerHTML = "aaaaa"

        }
    </script>
</head>

<body>
    <p id="p2" onclick="js_function(this)">Hello World!</p>



    <button onclick="displayDate()">点这里</button>
    <script>
        function displayDate() {
            document.getElementById("demo").innerHTML = Date();
        }
    </script>



    <button id="myBtn">点这里</button>
    <script>
        document.getElementById("myBtn").onclick = function() {
            displayDate()
        };

        function displayDate() {
            document.getElementById("demo").innerHTML = Date();
        }
    </script>
    <p id="demo"></p>




</body>

</html>